export const useTheme = () => {
  /***
   * get - 获取当前主题
   */
  const getTheme = () => {
    return document.documentElement.getAttribute('main-theme')
  }

  /**
   * set - 设置当前主题
   * @param type
   */
  const setTheme = (type: 'dark' | 'light') => {
    document.documentElement.setAttribute('main-theme', type)
  }

  return {
    getTheme,
    setTheme
  }
}
